takecheezefandomcom-20200214-history
Build System
unity builds article Finding linked library in executable * ldd ** can be used in Linux ** howto use in shared object * otool -L ** alternative of ldd in OS X ffmpeg * windows cross compile * MingW compilation guide * ffmpeg download * libmikmod ** libmikmod build autotools * difference between build, host, target ** format: ${ARCH}-${OS}-${BINARY_FORMAT} ** build: Compiling environment ** host: Cross compiler target ** target: Final target type * Good slide about autotools * To build autotools project ** 1: ./autogen.sh ** 2: ./configure ** 3: make ** 4: make install * automake ** Makefile generator? * autoconf ** configure script generator? * autotools in iOS SDK * ffmpeg in iOS using autotools Makefile * Popular build system backend. * Used to for building project with toolchain that isn't supported by autotools or CMake. * to override the variable pass "VAR=VALUE" after make command. If you set in before the command it will just override the env variable. * GNU make reference Ninja * repository * Small and fast build system like Makefile * Can be generated by CMake CMake * using visual studio project generator * passing linker flags * Useful variables ** Useful for toolchain script * Official Document * Cross Compiling Guide * MingW cross compile guide * Repository * Toolchain file collection * Toolchain file collection 2 * has header dependency checking * android library port using cmake * ios-cmake ** Howto use ** iOS.cmake ** Seems like it only supports old Xcode. ** using SDL 2.0 with cmake in iOS * cotire ** precompiled header and unity build helper * generating Android.mk using cmake CTest * test driver for CMake * setting env variable to test ** SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "VAR=VAL") * getting test's stdout CPack * packager for CMake * Using with CMake * building target "package" will create the package. Generator * Makefile * Visual Studio * Ninja * Xcode selecting files * Use aux_source_directory() to select all the supported source file * Use "file()" function to select particular files ** GLOB: just wildcard target directory ** GLOB_RECURSE: wildcard file recursively Uninstall command * official FAQ * isn't provided to avoid wrong file deletion Using D * home page * repository mirror Running external program * If it wanted to be run in CMakeLists.txt parse time, use execute_process() ** use OUTPUT_STRIP_TRAILING_WHITESPACE for unwanted newline * If you want to have a code generator use add_custom_command() * If you want custom command in Makefile use add_custom_target() Build type * use ${CMAKE_BUILD_TYPE} ** RELEASE ** DEBUG Generating File * use file() function's WRITE and APPEND. ** WRITE: like > redirect. clear file and write the passed string. ** APPEND: like >> redirect. append the passed string to the file. ** '\n' works as a new line. * If you want configuration file like autotools use configure_file() ** "@VAR@" will be replace by CMake variable "${VAR}" naming style * use camel case. * case ** function name: lower ** variable name: upper MacPorts * enabling default variants ** write variants to "/opt/local/etc/macports/variants.conf" ** +universal: build universal binary ** +no_x11: don't use x11 ** +quartz: use quartz as a rendering backend * universal binary ** set "universal_archs" variable to change the architectures ** ppc, ppc64: deprecated architecture. used in old Mac OS X ** i386: IA32 ** x86_64: amd64 * changing compiler ** add configure.compiler=$CC